package com.realtime.sys.controller;

import com.realtime.sys.service.GetDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

@Controller
public class IndexController {

    @Autowired
    private GetDataService getDataService;

    @GetMapping("/")
    public String index(Model model) {
        String data = getDataService.getData();
        model.addAttribute("data", data);
        return "index";
    }
}
